Perfect Sine Movement Animation
This tutorial describes how to calculate a perfect sine movement as demonstrated in this Flipnote. Overview This tutorial will show you how to animate an object in a sine wave-like fashion. The oscillation of a sine wave can be illustrated by having an object move up and down in a continuous fashion, in addition to a continuous moving background to simulate the movement of the object along a wavelength. In addition, the tutorial emphasizes the conformation to continuity, in order to animate in a truly smooth fashion as characteristic of a sine wave. This is accomplished by making very small incremental movements in your animation, and this tutorial will utilize some mathematical formulas to help you create a smooth animation. Create the Position Table First we create a table with all the absolute pixel positions for the object. You need this input parameters for the following formulas. Best is you take a sheet of paper and write everything down. Now you have to prepare some values first: \text{C} = \frac{\left( \text{S} - \text{H} \right)}{2} \text{M} = \text{C} - \left( \text{G} \cdot 2 \right) The parameter C''' is the center of your animation. If the top or left side of your object is at this position, it should be in the middle of the screen. The parameter '''M is the size of the movement on the screen, without the gaps. Take a paper and draw a table with the number of pages you like to create for the animation (your parameter P'). Make three columns and number the first column, starting from 0. This table should look like this: We call this number in the first column index ('I). Now you have to calculate the result (X) for each row in the table. Use a calculator for this. Make sure it has the sinus function (called "sin"). Check if the sinus function uses degrees as input. You can do this by calculating the sinus for the value 90. You should get 1, then everything is fine. \text{X} = \text{C} + \sin\left( -180 + \frac{ 360 \cdot \text{I} }{ \text{P} } \right) \cdot \text{M} + 0.5 Important: Ignore all digits after the decimal point, just write down the number before the decimal point. Fill the Movement Column Now write the resulting movement into the third column. You calculate it just by subtracting the previous value from the current one. Example: You see this is quite simple. Use a calculator if you are unsure about the minus prefix in the calculations. Animate the Object After you have everything prepared for your animation, the really work intense part is following. #Create an empty page at the end of your Flipnote with just the object on it which you like to animate. Make sure at the top or left side is some good mark which which you easily can see the correct position on the screen. #Move the object at the top or left border (depending on the animation direction) that it exactly touches the border without any gap. Move always the whole screen to position your object. This is much faster than select and copy it with the selection tools. #Move the object to the absolute position you calculated for index 0. You press and hold L and use the D-Pad to move your object pixel by pixel to the destination position. Just count every pixel movement until you reach the calculated value. #Enable the copy page mode. #Create the next page, and move your object by the calculated movement value. A negative number means left or up, a positive number means right or down (depending on your animation direction). Repeat this for all index positions. #Done! That's it; you created a perfect sinus movement animation. Category:Tutorial